package com.authority.controller;


import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by Administrator on 2016/10/26.
 */
@Controller
@RequestMapping(value = "/authView")
public class AuthorityViewShow extends BaseManager {

    @RequestMapping(value = "/{view}")
    public String showView(@PathVariable String view,ModelMap model,HttpServletRequest request){
        String basePath = request.getServerName()+":"+request.getServerPort()+request.getContextPath();
        model.put("basePath",basePath);
        return view;
    }

    @RequestMapping(value = "/{view1}/{view2}")
    public String showView(@PathVariable String view1,@PathVariable String view2,ModelMap model,HttpServletRequest request){
        String basePath = request.getServerName()+":"+request.getServerPort()+request.getContextPath();
        model.put("basePath",basePath);
        return view1+"/"+view2;
    }
}
